package cn.hdu.liang.strings;

import java.util.Scanner;

public class BetterRead {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(SimpleRead.input);

        System.out.println("你叫什么?");
        String name = stdin.nextLine();
        System.out.println(name);

        System.out.println("你多大，你最喜欢的数字是?");
        System.out.println("(输入: <age> <double>)");
        int age = stdin.nextInt();
        double favorite = stdin.nextDouble();

        System.out.println(age);
        System.out.println(favorite);
        System.out.format("Hi %s.\n", name);
        System.out.format("In 5 五年后你 %d 岁.\n", age + 5);
        System.out.format("我最喜欢的数字是 %f.", favorite / 2);
    }
}